package vistas;

import javax.swing.JInternalFrame;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JPanel;
import java.awt.FlowLayout;
import javax.swing.JButton;

public abstract class FormularioEdicion extends JInternalFrame 
{
	protected JPanel pnlContenido;
	protected JPanel pnlBotones;
	
	public abstract Object capturar();
	public abstract void rellenar(Object value);

	/**
	 * Create the frame.
	 */
	public FormularioEdicion() {
		setBounds(100, 100, 618, 625);
		
		pnlBotones = new JPanel();
		
		pnlContenido = new JPanel();
		GroupLayout groupLayout = new GroupLayout(getContentPane());
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup()
					.addContainerGap()
					.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
						.addComponent(pnlContenido, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 523, Short.MAX_VALUE)
						.addComponent(pnlBotones, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 439, Short.MAX_VALUE))
					.addGap(12))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.TRAILING)
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap()
					.addComponent(pnlContenido, GroupLayout.DEFAULT_SIZE, 477, Short.MAX_VALUE)
					.addGap(18)
					.addComponent(pnlBotones, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addContainerGap())
		);
		pnlBotones.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JButton btnGuardar = new JButton("Guardar");
		pnlBotones.add(btnGuardar);
		
		JButton btnCancelar = new JButton("Cancelar");
		pnlBotones.add(btnCancelar);
		getContentPane().setLayout(groupLayout);
		


	}
}
